package parse_and_index.model;

import java.io.Serializable;

public class Document implements Serializable {

	  private static final long serialVersionUID = -7941309150477201366L;
	  private String			name;
	  private String			encoding;
	  private long			  ID;

	  private static long	   uID			  = 0;

	  public Document(final String n, final long id, final String enc) {
			setName(n);
			setID(id);
			setEncoding(enc);
	  }

	  public Document(final String n, final String enc) {
			setName(n);
			setID(uID++);
			setEncoding(enc);
	  }

	  @Override
	  public String toString() {
			return Long.toString(getID()) + " : " + getName() + ":" + getEncoding();
	  }

	  public String getName() {
			return name;
	  }

	  public void setName(final String name) {
			this.name = name;
	  }

	  public String getEncoding() {
			return encoding;
	  }

	  public void setEncoding(final String encoding) {
			this.encoding = encoding;
	  }

	  public long getID() {
			return ID;
	  }

	  public void setID(final long iD) {
			ID = iD;
	  }
}
